module.exports = {
	get(s) {
		// 获取单个节点
		return document.querySelector(s);
	},
	getAll(s) {
		// 获取多个节点
		return document.querySelectorAll(s);
	},
	// 底部导航
	tabbar(fliename) {
		let html = `
    <a href="../first.html" class="${
			fliename === "index" ? "active" : ""
		} "><i class="iconfont icon-shouye"></i> 首页</a>
    <a href="../sports_course.html" class="${
			fliename === "sport" ? "active" : ""
		}"><i class="iconfont icon-shouye1"></i> 运动</a>
    
    <a href="../mine.html" class="${
			fliename === "mine" ? "active" : ""
		}"><i class="iconfont icon-wode"></i>我的</a>
    `;
		this.get("#tabbar").innerHTML = html;
	},
	// 头部导航
	navbar(fliename) {
		let html = `
		<a href="../sport_run.html" class="${
			fliename === "run" ? "active" : ""
		} ">跑步</a>
		<a href="../sport_ride.html" class="${
			fliename === "ride" ? "active" : ""
		} ">骑行</a>
		<a href="../sports_course.html" class="${
			fliename === "course" ? "active" : ""
		} ">课程训练</a>
		`;
		this.get("#navbar").innerHTML = html;
	},
};
